package com.hsfw.dbmodule.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator;
import org.springframework.stereotype.Component;

@Component("dbHealthIndicator")
public class DataSourceHealth extends DataSourceHealthIndicator implements InitializingBean {
    @Autowired
    DataSourceConfig dataSourceConfig;

    /**
     * 数据库健康状态检测
     *
     * @param builder
     * @throws Exception
     */
    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {


    }

    @Override
    public void afterPropertiesSet() throws Exception {
    }
}
